<?php get_header(); ?>

<div id="page">
<?php get_sidebar(); ?>

	<?php if (have_posts()) : ?>
	<?php while (have_posts()) : the_post(); ?>

		<div class="nav">
			<div class="nleft"><?php previous_post_link('%link') ?></div>
			<div class="nright"><?php next_post_link('%link') ?></div>
		</div>

<div id="content">
<div class="post" id="post-<?php the_ID(); ?>">

	<div class="postdate">
	  <p class="date"><?php the_time('jS'); ?></p>
	  <p class="year"><?php the_time('Y,m'); ?></p>
	</div>
	<div class="posttitle">
    <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
      <p class="postmeta"><span class="file"><?php the_category(', ') ?></span><span class="edit"><?php the_author() ?></span><?php edit_post_link('Edit', '', ''); ?></p>
    </div>

	<div class="content">
		<?php the_content('Read the rest of this entry &raquo;'); ?>
		
		<?php the_tags('<p class="tag">', ', ', '</p>'); ?>
		

		<?php if ((function_exists('wp23_related_posts')) and is_single()) { ?>
			<?php wp23_related_posts(); ?>
		<?php } ?>
	</div>

    <div id="comments">
	<div class="crt"><a href="<?php trackback_url(true); ?>" rel="trackback">Trackback url</a> | <?php comments_rss_link(__('Rss 2.0','')); ?></div>
	<?php comments_template(); ?>
    </div>
	</div>
</div>
		<?php endwhile; ?>

		<div class="navigation">
			<div class="alignleft"><?php next_posts_link('&laquo; Older Entries') ?></div>
			<div class="alignright"><?php previous_posts_link('Newer Entries &raquo;') ?></div>
		</div>

	<?php else : ?>

		<h2 class="center">Not Found</h2>
		<p class="center">Sorry, but you are looking for something that isn't here.</p>
		<?php include (TEMPLATEPATH . "/searchform.php"); ?>

	<?php endif; ?>


</div>
</div>

<?php get_footer(); ?>
